package com.woniuxy.controller;

import com.woniuxy.entity.RbacMenu;
import com.woniuxy.servcie.RbacMenuService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * description: RbacMenuController <br>
 * date: 2021/12/9 4:19 下午 <br>
 * author: shesaifei <br>
 * version: 1.0 <br>
 */
@RestController
@RequestMapping("/menu")
public class RbacMenuController {
    @Autowired
    RbacMenuService rbacMenuService;
    @RequestMapping("/findAll")
    @ApiOperation(value = "这个按条件搜索分页",notes = "返回的是一个list")
    public List<RbacMenu>findAll(){
        List<RbacMenu> allByRoleId = rbacMenuService.findAllByRoleId("1");
        System.out.println(allByRoleId);
        return rbacMenuService.findAll();
    }
}
